# coding=utf-8
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
import time
class Login():
    def loginXxBack(driver,username,password):
        x = 'C:/Program Files (x86)/Google/Chrome/Application/chromedriver.exe'
        # x='C:/ProgramData/Microsoft/Windows/Start/Menu/Programs/chromedriver.exe'
        driver.get('http://52.80.159.11:8204/login')
        driver.find_element_by_xpath('//*[@id="quasar-app"]/div/div/div/div/form/div[1]/div/div/input').clear()
        time.sleep(1)
        driver.find_element_by_xpath('//*[@id="quasar-app"]/div/div/div/div/form/div[1]/div/div/input').send_keys(username)
        time.sleep(1)
        driver.find_element_by_xpath('.//*[@id="quasar-app"]/div/div/div/div/form/div[2]/div/div/input').clear()
        time.sleep(1)
        driver.find_element_by_xpath('//*[@id="quasar-app"]/div/div/div/div/form/div[2]/div/div/input').send_keys(password)
        time.sleep(1)
        driver.find_element_by_xpath('//*[@id="quasar-app"]/div/div/div/div/form/button').click()
        driver.implicitly_wait(10)